/*
 * Copyright (c) 2016. For Intelligent Group.
 */

package com.intelligent.ispc.core.service;


import com.intelligent.ispc.core.dto.*;

import java.util.List;

/**
 * Created by Julia.Zhou on 2016/08/16.
 */
public interface ReportService {

    /**
     * Search search keys and attribute keys and itemNames.
     *
     * @param filePaths  source files path
     * @return the data dto
     */
    FieldDataSourceDto findFieldDataSource(List<String> filePaths);

    /**
     * Search grr summary and detail.
     *
     * @param filePaths  source files path
     * @param searchKeys group search key
     * @param groupKeys grr view data dtos
     * @param testItemNames test item names
     * @param yieldItemParamDto yield param
     * @return the data dto
     */
    List<YieldDto> getYield(List<String> filePaths, List<DynSearchFieldDto> searchKeys, List<String> groupKeys, List<String> testItemNames, YieldItemParamDto yieldItemParamDto);

    /**
     * Search grr summary and detail.
     *
     * @param filePaths  source files path
     * @param searchKeys search keys
     * @param groupKeys group keys
     * @param groupValue every group value
     * @param type 0 firstInspect, 1 first firstPass, 2 first fail, 3 retestInspect, 4 retestPass, 5retestFail
     * @param testItemNames test item names
     * @param yieldItemParamDto yield param
     * @return the data dto
     */
    YieldHistoryDto getYieldHistory(List<String> filePaths, List<DynSearchFieldDto> searchKeys, List<String> groupKeys, String groupValue, Integer type, List<String> testItemNames, YieldItemParamDto yieldItemParamDto);

    /**
     * Search grr summary.
     *
     * @param filePaths  source files path
     * @param testItemNames test item names
     * @return the data dto
     */
    YieldItemParamDto getYieldItemParam(List<String> filePaths, List<String> testItemNames);

    /**
     * Search grr summary and detail.
     *
     * @param filePaths  source files path
     * @param searchKeys search keys
     * @param groupKeys group keys
     * @param testItemNames test item names
     * @param yieldItemParamDto yield param
     * @return the data dto
     */
    YieldExportDto getSummaryAndDetail(List<String> filePaths, List<DynSearchFieldDto> searchKeys, List<String> groupKeys, List<String> testItemNames, YieldItemParamDto yieldItemParamDto);

    /**
     * Export grr summary.
     *
     * @param filePaths  source files path
     * @param searchKeys search keys
     * @param groupKeys group keys
     * @param testItemNames test item names
     * @param yieldItemParamDto yield param
     * @return the export file path
     */
    String exportSummary(List<String> filePaths, List<DynSearchFieldDto> searchKeys, List<String> groupKeys, List<String> testItemNames, YieldItemParamDto yieldItemParamDto);

    /**
     * Export grr summary and detail.
     *
     * @param filePaths  source files path
     * @param searchKeys search keys
     * @param groupKeys group keys
     * @param testItemNames test item names
     * @param yieldItemParamDto yield param
     * @return the export file path
     */
    String exportSummaryAndDetail(List<String> filePaths, List<DynSearchFieldDto> searchKeys, List<String> groupKeys, List<String> testItemNames, YieldItemParamDto yieldItemParamDto);
}
